﻿using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using Fuse8.DomainFramework.Domain;

namespace Fuse8.DomainFramework.DataAccess.SqlDatabase
{
	/// <summary>
	/// Schema builder for entity
	/// </summary>
	public interface ISqlSchemaBuilder
	{
		/// <summary>
		/// Get columns list for entity
		/// </summary>
		/// <param name="connection">Current connection</param>
		/// <typeparam name="T">Entity type</typeparam>
		/// <returns>List of columns for entity</returns>
		IList<SqlColumn> GetColumns<T>(SqlConnection connection);

		/// <summary>
		/// Get columns list for entity
		/// </summary>
		/// <param name="type">Entity type</param>
		/// <param name="connection">Current connection</param>
		/// <returns>List of columns for entity</returns>
		IList<SqlColumn> GetColumns(Type type, SqlConnection connection);

	    /// <summary>
	    /// 
	    /// </summary>
	    /// <param name="connection"></param>
	    /// <param name="transaction"> </param>
	    /// <param name="sp"></param>
	    /// <returns></returns>
        IList<SqlProcedureParameter> GetStoredProcedureParameters(SqlConnection connection, SqlTransaction transaction, string sp);

	    /// <summary>
	    /// 
	    /// </summary>
	    /// <typeparam name="T"></typeparam>
	    /// <returns></returns>
	    IList<Type> GetUpdateParts<T>();
	}
}